﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 在线用户表
/// </summary>
public partial class OnlineUser : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 连接Id
    /// </summary>
    [DisplayName("连接Id")]
    [JsonPropertyName("connectionId")]
    public string? ConnectionId { get; set; }

    /// <summary>
    /// 用户Id
    /// </summary>
    [DisplayName("用户Id")]
    [JsonPropertyName("userId")]
    public long UserId { get; set; }

    /// <summary>
    /// 账号
    /// </summary>
    [DisplayName("账号")]
    [JsonPropertyName("account")]
    [Required(ErrorMessage = "账号不能为空")]
    [StringLength(20)]
    public string? Account { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    [DisplayName("姓名")]
    [JsonPropertyName("name")]
    [StringLength(20)]
    public string? Name { get; set; }

    /// <summary>
    /// 最后连接时间
    /// </summary>
    [DisplayName("最后连接时间")]
    [JsonPropertyName("lastTime")]
    public System.DateTimeOffset? LastTime { get; set; }

    /// <summary>
    /// 最后登录IP
    /// </summary>
    [DisplayName("最后登录IP")]
    [JsonPropertyName("lastLoginIp")]
    [StringLength(50)]
    public string? LastLoginIp { get; set; }

    /// <summary>
    /// 最后登录所用浏览器
    /// </summary>
    [DisplayName("最后登录所用浏览器")]
    [JsonPropertyName("lastLoginBrowser")]
    [StringLength(20)]
    public string? LastLoginBrowser { get; set; }

    /// <summary>
    /// 最后登录所用系统
    /// </summary>
    [DisplayName("最后登录所用系统")]
    [JsonPropertyName("lastLoginOs")]
    [StringLength(20)]
    public string? LastLoginOs { get; set; }

    /// <summary>
    /// 租户id
    /// </summary>
    [DisplayName("租户id")]
    [JsonPropertyName("tenantId")]
    public long TenantId { get; set; }

}
